Optimal. Leaf size=109 \[ -\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac{5 i \tan ^3(c+d x)}{6 a d}+\frac{\tan ^2(c+d x)}{a d}+\frac{5 i \tan (c+d x)}{2 a d}+\frac{2 \log (\cos (c+d x))}{a d}-\frac{5 i x}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.123876, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3550, 3528, 3525, 3475} \[ -\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac{5 i \tan ^3(c+d x)}{6 a d}+\frac{\tan ^2(c+d x)}{a d}+\frac{5 i \tan (c+d x)}{2 a d}+\frac{2 \log (\cos (c+d x))}{a d}-\frac{5 i x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3550
Rule 3528
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int \frac{\tan ^5(c+d x)}{a+i a \tan (c+d x)} \, dx &=-\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac{\int \tan ^3(c+d x) (4 a-5 i a \tan (c+d x)) \, dx}{2 a^2}\\ &=-\frac{5 i \tan ^3(c+d x)}{6 a d}-\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac{\int \tan ^2(c+d x) (5 i a+4 a \tan (c+d x)) \, dx}{2 a^2}\\ &=\frac{\tan ^2(c+d x)}{a d}-\frac{5 i \tan ^3(c+d x)}{6 a d}-\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac{\int \tan (c+d x) (-4 a+5 i a \tan (c+d x)) \, dx}{2 a^2}\\ &=-\frac{5 i x}{2 a}+\frac{5 i \tan (c+d x)}{2 a d}+\frac{\tan ^2(c+d x)}{a d}-\frac{5 i \tan ^3(c+d x)}{6 a d}-\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac{2 \int \tan (c+d x) \, dx}{a}\\ &=-\frac{5 i x}{2 a}+\frac{2 \log (\cos (c+d x))}{a d}+\frac{5 i \tan (c+d x)}{2 a d}+\frac{\tan ^2(c+d x)}{a d}-\frac{5 i \tan ^3(c+d x)}{6 a d}-\frac{\tan ^4(c+d x)}{2 d (a+i a \tan (c+d x))}\\ \end{align*}
Mathematica [B] time = 3.43854, size = 235, normalized size = 2.16 \[ \frac{\sec (c+d x) (\cos (d x)+i \sin (d x)) \left (6 d x \sin (c)+3 \sin (c) \sin (2 d x)+3 i \sin (c) \cos (2 d x)-4 i \sin (d x) \sec ^3(c+d x)+2 i \sin (c) \sec ^2(c+d x)+28 i \sin (d x) \sec (c+d x)+12 i \sin (c) \log \left (\cos ^2(c+d x)\right )+24 (\sin (c)-i \cos (c)) \tan ^{-1}(\tan (d x))+4 \tan (c) \sin (d x) \sec ^3(c+d x)+4 \sin (c) \tan (c) \sec ^2(c+d x)-28 \tan (c) \sin (d x) \sec (c+d x)+3 \cos (c) \left (2 \sec ^2(c+d x)+4 \log \left (\cos ^2(c+d x)\right )-2 i d x+i \sin (2 d x)-\cos (2 d x)\right )\right )}{12 d (a+i a \tan (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.024, size = 106, normalized size = 1. \begin{align*}{\frac{2\,i\tan \left ( dx+c \right ) }{ad}}-{\frac{{\frac{i}{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{ad}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,ad}}+{\frac{{\frac{i}{2}}}{ad \left ( \tan \left ( dx+c \right ) -i \right ) }}-{\frac{9\,\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{4\,ad}}+{\frac{\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{4\,ad}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.38229, size = 532, normalized size = 4.88 \begin{align*} \frac{-54 i \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 3 \,{\left (54 i \, d x + 17\right )} e^{\left (6 i \, d x + 6 i \, c\right )} - 81 \,{\left (2 i \, d x + 1\right )} e^{\left (4 i \, d x + 4 i \, c\right )} +{\left (-54 i \, d x - 65\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 24 \,{\left (e^{\left (8 i \, d x + 8 i \, c\right )} + 3 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, e^{\left (4 i \, d x + 4 i \, c\right )} + e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 3}{12 \,{\left (a d e^{\left (8 i \, d x + 8 i \, c\right )} + 3 \, a d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.08176, size = 202, normalized size = 1.85 \begin{align*} \frac{- \frac{4 e^{- 2 i c} e^{4 i d x}}{a d} - \frac{6 e^{- 4 i c} e^{2 i d x}}{a d} - \frac{14 e^{- 6 i c}}{3 a d}}{e^{6 i d x} + 3 e^{- 2 i c} e^{4 i d x} + 3 e^{- 4 i c} e^{2 i d x} + e^{- 6 i c}} + \begin{cases} - \frac{e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text{for}\: 4 a d e^{2 i c} \neq 0 \\x \left (- \frac{\left (9 i e^{2 i c} - i\right ) e^{- 2 i c}}{2 a} + \frac{9 i}{2 a}\right ) & \text{otherwise} \end{cases} - \frac{9 i x}{2 a} + \frac{2 \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 3.60245, size = 140, normalized size = 1.28 \begin{align*} \frac{\frac{3 \, \log \left (\tan \left (d x + c\right ) + i\right )}{a} - \frac{27 \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a} + \frac{3 \,{\left (9 \, \tan \left (d x + c\right ) - 7 i\right )}}{a{\left (\tan \left (d x + c\right ) - i\right )}} - \frac{2 \,{\left (2 i \, a^{2} \tan \left (d x + c\right )^{3} - 3 \, a^{2} \tan \left (d x + c\right )^{2} - 12 i \, a^{2} \tan \left (d x + c\right )\right )}}{a^{3}}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]